//
//  WATFFTVVender.h
//  WATFFTVTunnel
//
//  Created by one on 2024/1/5.
//

#import <Foundation/Foundation.h>

#ifdef STAGE_ENV
#define DLog(...) DDLogInfo(__VA_ARGS__)
#else
#define DLog(...)
#endif

#define DErrorLog(...) DDLogError(__VA_ARGS__)

NS_ASSUME_NONNULL_BEGIN

@interface WATFFTVVender : NSObject
/**
 * Initializes the object with a local LocalSocks port, |LocalSocksPort|.
 */
- (id)initWithPort:(uint16_t)LocalSocksPort;

/**
 * Verifies that the server has enabled UDP forwarding. Performs an end-to-end test by sending
 * a DNS request through the proxy. This method is a superset of |checkServerCredentials|, as its
 * success implies that the server credentials are valid.
 */
- (void)isUdpShadowSocksAvailabled:(void (^)(BOOL))completion;

/**
 * Verifies that the server credentials are valid. Performs an end-to-end authentication test
 * by issuing an HTTP HEAD request to a target domain through the proxy.
 */
- (void)checkServerCredentials:(void (^)(BOOL))completion;

- (void)checkServerConnectivity:(void (^)(BOOL))completion;

/**
 * Checks that the server is reachable on |host| and |port|.
 */
- (void)isReachable:(NSString *)host port:(uint16_t)port completion:(void (^)(BOOL))completion;


@end
 

NS_ASSUME_NONNULL_END

